<%@page import="edu.uit.se.laps.web.model.TaiKhoan"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!-- pageEncoding="UTF-8"%> -->
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ page
	import="edu.uit.se.laps.web.*,edu.uit.se.laps.web.controller.*, java.net.*,java.text.*,java.util.*"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body,input {
	font-family: Calibri, Arial;
}

table#contact {
	border-collapse: collapse;
	width: 550px;
}

th {
	height: 40px;
	background-color: #ffee55;
}
ul{
	list-style-type: none;
}
ul a{
	width: 120px;
	display: inline-block;
}
textarea{
	max-width: 400px;
	width: 300px;
}

.taotk{
	width: 120px;
	height: 40px;
	background: red;
	color: white;
	border: none;
	font-size: 18px;
	cursor: pointer;
}
.taotk:hover{
	background: #6B0000;
}

.tt_taikhoan{
	margin-bottom: 60px;
	width: 100%;
}
table{
	border-collapse: collapse;
	width: 100%;
}
table tr,th,td{
	border-collapse: collapse;
	border: 1px solid black;
}
</style>
<title>myLife - Đơn hàng</title>

<s:head />
<!-- the s:head de thong bao loi validation -->
</head>
<body>
<tiles:insertTemplate template="Template.jsp">
	<tiles:putAttribute name="focusbody">
	
	<%
		ShoppingCart cart = (ShoppingCart) session
				.getAttribute("ShoppingCart");

		if (cart == null) {
			cart = new ShoppingCart();
			session.setAttribute("ShoppingCart", cart);
		}
 
	%>

	 <h1>DANH SÁCH ĐƠN HÀNG</h1>

	<table id="sp">
		<tr>
			<th>Mã đơn hàng</th>
			<th>Mã khách hàng</th>
			<th>Ngày đặt</th>
			
			<th>Tên người nhận</th>
			<th>Địa điểm giao hàng</th>
			<th>Tình trạng</th>
			<th>Tiền thanh toán</th>
			<th>Ghi chú</th>
			<th>Thanh toán qua Paypal</th>
			 
		</tr>
		<s:iterator value="dhList" var="SP">
			<tr>
				 <td><s:property value="idDH" /></td>
				<td><s:property value="idUser" /></td>
				<td><s:property value="ngayDatHang" /></td>
				
				<td><s:property value="tenNguoiNhan" /></td>
				<td><s:property value="diaDiemGiaoHang" /></td>
				<td><s:property value="tinhTrang" /></td>
				<td><s:property value="tongTien" /></td>
				<td><s:property value="ghiChu" /></td>
				<td>
				<script src="jsS/paypal-button.min.js?merchant=marsnho@gmail.com" 
				    data-button="buynow" 
				    data-name="Thanh toan websale qua paypal, ma don hang: ${idDH}" 
				    data-quantity="1" 
				    data-amount="${tongTien/20000}" 
				    data-currency="USD"
				></script>
				</td>
			</tr>
		</s:iterator>
	</table><br><br><br><br>



		</tiles:putAttribute>
	
	</tiles:insertTemplate>
</body>
</html>